export const tableOption = () => {
  return {
    ...window.$crudMixins.tableOptions,
    addBtn: false,
    editBtn: false,
    delBtn: false,
    menuWidth: 120,
    labelWidth: 130,
    detail: true,
    column: [
      {
        label: '宠物头像',
        prop: 'avatar',
        width: 80,
        span: 24,
        type: 'upload',
        imgFullscreen: true,
        listType: 'picture-img',
        fileType: 'img', //img/video/audio
        rules: [
          {
            required: true,
            message: '请上传宠物头像',
            trigger: 'change',
          },
        ],
      },
      {
        label: '宠物编号',
        prop: 'code',
      },
      {
        label: '宠物昵称',
        prop: 'nickName',
      },
      {
        label: '宠物类型',
        prop: 'typeName',
      },
      {
        label: '宠物品种',
        prop: 'varietyName',
      },
      {
        label: '宠物性别',
        prop: 'gender',
        type: 'select',
        dicUrl: '/admin/dict/type/pet_sex',
      },
      {
        label: '绝育情况',
        prop: 'sterilization',
        type: 'select',
        dicUrl: '/admin/dict/type/sterilization',
      },
      {
        label: '疫苗情况',
        prop: 'vaccine',
        type: 'select',
        dicUrl: '/admin/dict/type/sterilization',
      },
      {
        type: 'select',
        label: '宠物来源',
        prop: 'petSource',
        dicData: [
          {
            label: '免费领养',
            value: '1',
          },
          {
            label: '购买',
            value: '2',
          },
          {
            label: '流浪宠物收留',
            value: '3',
          },
          {
            label: '自家繁育',
            value: '4',
          },
          {
            label: '赠与',
            value: '5',
          },
          {
            label: '其他',
            value: '9',
          },
        ],
      },
      {
        label: '到家日期',
        prop: 'arrivalDate',
        type: 'datetime',
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss',
        search: true,
        width: 160,
        searchRange: true,
      },
      {
        label: '所属爱心收容站',
        prop: 'baseId',
        dicUrl: '/core/base/list',
        props: {
          label: 'name',
          value: 'id',
        },
        type: 'select',
      },
      {
        label: '收容站位置',
        prop: 'baseAddress',
      },
      {
        label: '出生日期',
        prop: 'birthDay',
      },
      {
        label: '年龄段',
        prop: 'ageGroup',
        dicUrl: `/core/attribute/list/bind/CAT/ageGroup`,
        props: {
          label: 'attributeName',
          value: 'attributeCode',
        },
      },
      {
        label: '体重（kg）',
        prop: 'weight',
      },
      {
        label: '体型',
        prop: 'bodilyForm',
        dicUrl: `/core/attribute/list/bind/CAT/bodilyForm`,
        props: {
          label: 'attributeName',
          value: 'attributeCode',
        },
      },
      {
        label: '毛色',
        prop: 'furColor',
        dicUrl: `/core/attribute/list/bind/CAT/furColor`,
        props: {
          label: 'attributeName',
          value: 'attributeCode',
        },
      },
      {
        label: '毛发长度',
        prop: 'hairLength',
        type: 'select',
        rules: [
          {
            required: false,
            message: '请选择毛发长度',
          },
        ],
        dicUrl: `/core/attribute/list/bind/CAT/hairLength`,
        props: {
          label: 'attributeName',
          value: 'attributeCode',
        },
      },
      {
        label: '驱虫情况',
        prop: 'insectRepellent',
        type: 'select',
        dicData: [
          {
            label: '未知',
            value: '0',
          },
          {
            label: '未驱虫',
            value: '1',
          },
          {
            label: '已体内驱虫',
            value: '2',
          },
          {
            label: '已体外驱虫',
            value: '3',
          },
          {
            label: '已体外+体内驱虫',
            value: '4',
          },
        ],
      },
      {
        label: '宠物标签',
        prop: 'tag',
        slot: true,
        span: 24,
      },
    ],
  };
};
